// Rook.h
//
// Created By: Jeremy Butler
// Created On: 21-Mar-2011
//

#ifndef ROOK_H
#define ROOK_H

#include "Piece.h"
using namespace std;

class Rook : public Piece{
public:
  //! @brief No-Arg constructor
  Rook();

  //! @brief Constructor
  //! @param color the color to initialize this piece as.
  //! @param row the row that the Pawn should be initialized to.
  //! @param col the column that the Pawn should be initialized to.
  Rook(const Color _color);

  //! @brief Copy constructor
  //! @param other The Rook to be copied
  Rook(const Rook & other);

  //! @brief Destructor
  virtual ~Rook();

  //! @brief Operator = to used to copy another Rook to this one.
  //! @param other The Rook to be copied to this one.
  //! @return a reference to the newly copied Rook.
  Rook & operator = (const Rook & other);

  virtual Rook* Clone() const;

  virtual string ToString() const;

  // Begin inherited virtual functions
  virtual set<Location> GetValidMoves(const Board & board, int row, int col, bool AllMoves) const;
  // End inherited virtual functions

  //! @brief Method for testing
  //! @param os a reference to the output stream where to print results.
  //! @return true if tests succeeded. False otherwise.
  static bool Test(ostream & os);

private:
  void GetMoves1(const Board & board, int row, int col,
		 set<Location> & validMoves) const;
  void GetMoves2(const Board & board, int row, int col,
		 set<Location> & validMoves) const;
  void GetMoves3(const Board & board, int row, int col,
		 set<Location> & validMoves) const;
  void GetMoves4(const Board & board, int row, int col,
		 set<Location> & validMoves) const;
};

#endif /* ROOK_H */
